<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="*|/"><xsl:apply-templates/></xsl:template>

<xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>

<xsl:template match='nbsp' name='nbsp'>
<xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
</xsl:template>

<xsl:include href='../xsl.include.main.xsl'/>

<xsl:template match="messages">

<form name="mailbox" method="post" action="{@thisPage}">
<div style="padding: 2%; background: #C3D9FF;">
<input type="hidden" name="FORM_ID" value="mailbox"></input><xsl:value-of select="@totmsg"/> messaggi totali presenti nella tua casella di posta<br/><b>I messaggi vengono automaticamente cancellati dopo 30 giorni.</b>
</div>
<div style="padding: 10px; background: #C3D9FF; border-top:1px solid gray; float:right;">
<a href="javascript:document.mailbox.submit();"><b>Cancella</b></a><br/>selezionati
</div>
<div style="padding: 10px; background: #C3D9FF; border-top:1px solid gray;border-bottom: 1px dashed gray;">
Seleziona: <a href="javascript:checkAll();">tutti</a>, <a href="javascript:uncheckAll();">nessuno</a>, <a href="javascript:checkRead();">letti</a>, <a href="javascript:checkUnRead();">non letti</a>
<br/>&#160;
</div>

<TABLE class="body" cellSpacing="0" cellPadding="0"  border="0" width="100%">
<xsl:for-each select="row">
		<TR vAlign="top"> 
		<td bgcolor="#C3D9FF">&#160;</td>
			<TD width="10%" align="left" style="border-bottom: 1px dashed gray;padding-bottom:10px;padding-top:5px;padding-left:5px;">
				<nobr>
				<xsl:call-template name="user">
					<xsl:with-param name="status" select="@uStatus"/>
					<xsl:with-param name="sexid" select="@sexid"/>
					<xsl:with-param name="certified" select="@certified"/>
					<xsl:with-param name="userid" select="@senderid"/>
					<xsl:with-param name="nick" select="@senderNick"/>
				</xsl:call-template>
				</nobr>
  			</TD>
			<TD width="100%" align="left" style="border-bottom: 1px dashed gray;padding-bottom:10px;padding-top:5px;padding-left:5px;">
				<xsl:choose>
					<xsl:when test="@readtime">
						<a href="/mailbox/mailbox.aspx?msgid={@msgid}">
						<xsl:value-of select="@subject"/></a>
					</xsl:when>
					<xsl:otherwise>
						<b><a href="/mailbox/mailbox.aspx?msgid={@msgid}">
						<xsl:value-of select="@subject"/></a></b>
					</xsl:otherwise>
				</xsl:choose>
  			</TD>
			<TD width="10%" align="left" style="border-bottom: 1px dashed gray;padding-bottom:10px;padding-top:5px;padding-left:5px;" class="b10b">
				<nobr>
				<xsl:value-of select="substring(@sortdatetime,9,2)"/>-<xsl:value-of select="substring(@sortdatetime,6,2)"/>-<xsl:value-of select="substring(@sortdatetime,1,4)"/>&#160;
				<xsl:value-of select="substring(@sortdatetime,12,8)"/>
				</nobr>
  			</TD>
			<TD width="10%" align="center" style="border-bottom: 1px dashed gray;padding-bottom:10px;padding-top:5px;padding-left:5px;" >
				<xsl:choose>
					<xsl:when test="@readtime">
						<input type="checkbox" name="delete{@msgid}" read="true" value="{@msgid}"/>
					</xsl:when>
					<xsl:otherwise>
						<input type="checkbox" name="delete{@msgid}" read="false" value="{@msgid}"/>
					</xsl:otherwise>
				</xsl:choose>
  			</TD>
		<td bgcolor="#C3D9FF">&#160;</td>
		</TR>
</xsl:for-each>
</TABLE>
<div style="padding: 2%; background: #C3D9FF; text-align:right;">
<xsl:call-template name="browse-bar">
	<xsl:with-param name="page" 		select="@page"/>
	<xsl:with-param name="nrpages" 	select="@nrsteps"/>
	<xsl:with-param name="MyUrl" 		select="@MyUrl"/>
	<xsl:with-param name="varPage" 	select="'?page='"/>
</xsl:call-template>
</div>

</form>

</xsl:template>

</xsl:stylesheet>